
public class _PHY_Object 
{
  protected final Shape myShape;
  
  protected Vec2 position;
  protected Vec2 speed;
  protected Vec2 acc;
  
  protected double masse;
  protected float restitution;
  protected float angularD;
  
  protected double D = 0.0D;
  
  protected float rotation = 0;
  protected float rotationSpeed = 0;
  protected float rotationAcc = 0;
  

  _PHY_Object(Fixture f, Vec2 position) {
    
    this.position =position;
    speed = new Vec2();
    acc = new Vec2();
    masse = f.m;
    myShape = f.s;
    restitution = f.rest;
    angularD = f.angularDumping;
  }
  _PHY_Object(float x, float y) {
    
    position = new Vec2(x,y);
    speed = new Vec2();
    acc = new Vec2();
    this.masse = 1.0D;
    restitution =1;
    angularD = 1;
    myShape = Shape.rect;
  }
  public void step() {
    
  }
  public Vec2 getSpeed() {
    return this.speed;
  }
  public Vec2 getPosition() {
    return this.position;
  }
  public void impulse(Vec2 impuls)
  {
      acc.add(impuls);
  }

  public void stop(boolean absolute) {
    if (absolute)
    {
      speed = new Vec2();
    }
    acc = new Vec2();
  }
  public void slide(Vec2 value) {
    position.add(value);
  }
  public void setPosition(Vec2 value) {
    position = (value);
  }
}